<template>
    <el-carousel height="260px">
        <el-carousel-item v-for="item in imgList" :key="item.id">
            <img :src="item.img">
        </el-carousel-item>
    </el-carousel>
</template>

<script>
    export default {
        name: "home-banner",
        data(){
            return{
                imgList:[
                    {
                        id:1,
                        img:require('../../assets/img/1.jpg')
                    },
                    {
                        id:2,
                        img:require('../../assets/img/2.jpg')
                    },
                    {
                        id:3,
                        img:require('../../assets/img/3.jpg')
                    },
                    {
                        id:4,
                        img:require('../../assets/img/4.jpg')
                    }
                ]
            }
        }
    }
</script>

<style scoped lang="stylus">
    img
        display block
        width 100%
        height 100%
</style>